<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
     <script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
    <script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
    <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
</head>
<body>
     <div id="root"></div>
     <script type="text/babel">
        class Root extends React.Component {
            constructor()
            {
                super()
                this.state = {
                    message:"我是消息",
                    hrefUrl:"www.baidu.com",
                    active:true
                }
            }

            render()
            {
                return (
                    <div title="我是message">
                      {this.state.message}
                      <a href={this.state.hrefUrl}>百度一下</a>
                      <div style={{color:'red',background:'blue'}}>我是天，我是地</div>
                       <div className = {`nba cba dba ${this.state.active?'active':''}`}>Class绑定</div>
                    </div>
                )
            }
        }
        const app = ReactDOM.createRoot(document.querySelector("#root"))
        app.render(<Root/>)
     </script>
     
</body>
</html>